//package com.springcloud.apigateway.processor;
//
//import com.netflix.zuul.FilterProcessor;
//import com.netflix.zuul.ZuulFilter;
//import com.netflix.zuul.context.RequestContext;
//import com.netflix.zuul.exception.ZuulException;
//
///**
// * @author zhangwanli
// */
//public class ErrorFilterProcessor extends FilterProcessor {
//
//    @Override
//    public Object processZuulFilter(ZuulFilter filter) throws ZuulException {
//        try {
//            return super.processZuulFilter(filter);
//        } catch (ZuulException e) {
//            RequestContext currentContext = RequestContext.getCurrentContext();
//            //当前过滤器出现异常，将当前过滤器设置到RequestContext中
//            currentContext.set("failed.filter", filter);
//            throw e;
//        }
//    }
//}
